<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0075)https://memberssl.auction.co.kr/Common/PostSearch/PostSearchByRoadName.aspx -->
<HTML>
<HEAD>
<TITLE></TITLE>
<META content="text/html; charset=ks_c_5601-1987" http-equiv=Content-Type>

<link href="${pageContext.request.contextPath}/resources/zipcode/popup.css" rel="stylesheet">
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/zipcode/common.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/zipcode/jquery_002.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/zipcode/jquery.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/zipcode/jquery.selectbox.js"></script>
<SCRIPT type=text/javascript>
	jQuery(function($) {
		$('select.styled').selectbox();
	});

	//
	function selectOldType() {
		$("#oldType").addClass("on");
		$("#newType").removeClass("on");
		$(".zip-code").show();
		$(".street-name").hide();
		$(".result").hide();
		$("#hidCurrentMode").val("mode00");
		resizeWindowAutomatically();
	}

	//도로명+건물번호 방식
	function checkMode01() {
		$("#oldType").removeClass("on");
		$("#newType").addClass("on");
		$(".mode01").show();
		$(".mode02").hide();
		$(".mode03").hide();
		$(".notice").show();
		$("#hidCurrentMode").val("mode01");
		$(".street-name .search-area").show();
		$(".result").hide();
		resizeWindowAutomatically();
	}

	//동(읍/면)+지번 방식
	function checkMode02() {
		$("#oldType").removeClass("on");
		$("#newType").addClass("on");
		$(".mode01").hide();
		$(".mode02").show();
		$(".mode03").hide();
		$(".notice").show();
		$("#hidCurrentMode").val("mode02");
		$(".street-name .search-area").show();
		$(".result").hide();
		resizeWindowAutomatically();
	}

	//건물명 방식
	function checkMode03() {
		$("#oldType").removeClass("on");
		$("#newType").addClass("on");
		$(".mode01").hide();
		$(".mode02").hide();
		$(".mode03").show();
		$(".notice").show();
		$("#hidCurrentMode").val("mode03");
		$(".street-name .search-area").show();
		$(".result").hide();
		resizeWindowAutomatically();
	}

	window.onload = function() {

		$(".mode01").hide();
		$(".mode02").hide();
		$(".mode03").hide();

		if ($("#hidCurrentMode").val() == "mode01") {
			checkMode01();
			$("#cb01").click();
		} else if ($("#hidCurrentMode").val() == "mode02") {
			checkMode02();
			$("#cb02").click();
		} else if ($("#hidCurrentMode").val() == "mode03") {
			checkMode03();
			$("#cb03").click();
		} else { // 기본은 첫번째 라디오 버튼(도로명+건물번호)로 검색
			selectOldType();
			//checkMode01();
			//$("#cb01").click();
			//resize_popup(450, 420);
		}

		// 이 초기화가 도로명 리스트 요청에 의한 포스트백이라면 result를 활성화
		if ("" === "many") { // 건수가 한페이지보다 많을 때
			$(".roadname_list").show();
			$(".paging_area").show();
			$(".ex").hide();
			$(".notice").hide();
		} else if ("" === "none") { // 하나도 없을 때
			$(".no_list").show();
			$("#spanPageNavigator").hide();

		} else if ("" === "little") { // 한페이지 미만일 때
			$(".roadname_list").show();
			$(".ex").hide();
			$(".notice").hide();
			$("#spanPageNavigator").hide();
		} else {
		} // error

		if ("" === "exist") {
			$("#hdivResult").show();
			$("#hdivResultNo").hide();
		} else if ("" === "none") {
			$("#hdivResult").hide();
			$("#hdivResultNo").show();
		} else {
		}

		resizeWindowAutomatically();
	};

	function resizeWindowAutomatically() {
		var finallyHeight = $(".new-address").height();
		resize_popup(450, finallyHeight);
	}

	// 신형규(띄어쓰기조차하지말것)
	function clickOldStyleSearchButton() {
		if ($("#htxtDongName").val() == ""
				|| $("#htxtDongName").val() == "동(읍/면/리/가)") {
			alert("검색할 지역명을 입력하세요.");
			return;
		}
		
		form1.submit();
	}

	var previousString = "";
	function clearForm(obj, defaultvalue) {
		if (obj.value == defaultvalue) {
			previousString = obj.value;
			obj.value = "";
		}
	}

	function escapeForm(obj, defaultValue) {
		if (obj.value == "")
			obj.value = defaultValue;
	}

	function selectRoadNumberingAddress(roadNameStyleAddr, oldStyleAddr,
			zipCode) {
		$(".detail_addr").show();
		$(".mode01").hide();
		$(".mode02").hide();
		$(".mode03").hide();
		$(".street-name .search-area").hide();
		$(".roadname_list").hide();
		$(".paging_area").hide();
		$("#txtLeftZipCode").val(zipCode.substr(0, 3));
		$("#txtRightZipCode").val(zipCode.substr(3, 3));
		$("#txtAddress").val(roadNameStyleAddr);
		$("#txtOldStyleAddress").val(oldStyleAddr);
		resizeWindowAutomatically();
	}

	function sendPostAddressInfo() {
		var zipCode1 = $("#txtLeftZipCode").val();
		var zipCode2 = $("#txtRightZipCode").val();
		var roadNameAddr = $("#txtAddress").val();
		var detailAddr = $("#txtDetailAddress").val();
		var oldVerAddr = $("#txtOldStyleAddress").val();

		if (opener && opener.Callback_PostAddressInfo)
			opener.Callback_PostAddressInfo(zipCode1, zipCode2, oldVerAddr,
					roadNameAddr, detailAddr, "");

		self.close();
		return true;
	}

	function sendOldStyleAdderssInfo(zipCode1, zipCode2, oldVerAddr) {

		if (opener && opener.Callback_PostAddressInfo)
			opener.Callback_PostAddressInfo(zipCode1, zipCode2, oldVerAddr, "",
					"", "");

		self.close();
		return true;
	}
</SCRIPT>

<META name=GENERATOR content="MSHTML 9.00.8112.16457">
</HEAD>
<BODY>
	<FORM id=form1 method=post name=form1 action=zipcodesearch>
		<DIV>
			<INPUT id=__EVENTTARGET name=__EVENTTARGET type=hidden> <INPUT
				id=__EVENTARGUMENT name=__EVENTARGUMENT type=hidden> <INPUT
				id=__LASTFOCUS name=__LASTFOCUS type=hidden> <INPUT
				id=__VIEWSTATE name=__VIEWSTATE
				value=/wEPDwULLTE1MjcyODA5MTkPFgIeDnVuaW9uUGFyYW1ldGVyZBYCAgMPZBYIAgsPEGQQFRIG7KCE7LK0D+yEnOyauO2KueuzhOyLnA/rtoDsgrDqtJHsl63si5wP64yA6rWs6rSR7Jet7IucD+yduOyynOq0keyXreyLnA/qtJHso7zqtJHsl63si5wP64yA7KCE6rSR7Jet7IucD+yauOyCsOq0keyXreyLnBXshLjsooXtirnrs4TsnpDsuZjsi5wJ6rCV7JuQ64+ECeqyveq4sOuPhAzqsr3sg4Hrgqjrj4QM6rK97IOB67aB64+EDOyghOudvOuCqOuPhAzsoITrnbzrtoHrj4QV7KCc7KO87Yq567OE7J6Q7LmY64+EDOy2qeyyreuCqOuPhAzstqnssq3rtoHrj4QVEgEwATEBMgEzATQBNQE2ATcBOAE5AjEwAjExAjEyAjEzAjE0AjE1AjE2AjE3FCsDEmdnZ2dnZ2dnZ2dnZ2dnZ2dnZxYBZmQCDQ8QZBAVAQAVAQAUKwMBZ2RkAhkPFCsAAmRkZAIbDxQrAAJkZGRk46Xq3/20gJZlL9S8+KjZkSPg8QQ=
				type=hidden>
		</DIV>
		<SCRIPT type=text/javascript>
			//<![CDATA[
			var theForm = document.forms['form1'];
			if (!theForm) {
				theForm = document.form1;
			}
			function __doPostBack(eventTarget, eventArgument) {
				if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
					theForm.__EVENTTARGET.value = eventTarget;
					theForm.__EVENTARGUMENT.value = eventArgument;
					theForm.submit();
				}
			}
			//]]>
		</SCRIPT>

		<DIV style="DISPLAY: none">
			<INPUT id=hidCurrentMode name=hidCurrentMode type=hidden> <INPUT
				id=btnSearch name=btnSearch type=submit> <INPUT
				id=btnSearch_OldStyle name=btnSearch_OldStyle type=submit>
		</DIV>
		<DIV class=new-address>
			<DIV class=title>
				<H1>
					<SPAN><IMG alt=주소찾기 src="${pageContext.request.contextPath}/resources/zipcode/find_address.gif"></SPAN>
				</H1>
			</DIV>
			<DIV class=container>
				<DIV class=tab01>
					<UL>
						<LI id=oldType class=on><A href="javascript:selectOldType();">우편번호로
								찾기</A></LI>
					</UL>
				</DIV>
				<DIV class=content>
					<DIV style="DISPLAY: none" class=zip-code>
						<P class=type>
							찾고자 하는 주소명(동/읍/면/리/가)을 입력하세요.<SPAN>&nbsp;(예:역삼1동)</SPAN>
						</P>
						<!-- 신형규 -->
							<DIV class=search-area>

								<DIV class=word>




									<LABEL><SPAN>검색어</SPAN> <INPUT
										onblur="escapeForm(this,'동(읍/면/리/가)');" style="WIDTH: 165px"
										onkeydown="if(event.keyCode==13){clickOldStyleSearchButton(); return false;}"
										id=htxtDongName onfocus="clearForm(this,'동(읍/면/리/가)');"
										name=htxtDongName value=동(읍/면/리/가) type=text></LABEL> <A
										class=search href="javascript:clickOldStyleSearchButton();"><IMG
										alt=검색 src="${pageContext.request.contextPath}/resources/zipcode/btn_search.gif"></A>
								</DIV>
							</DIV>
							<P>
								<SPAN>※ 검색 후 우편번호를 클릭해주세요.</SPAN>
							</P>
							<!-- 우편번호 검색결과 -->
					</DIV>
					<DIV style="DISPLAY: none" id=hdivResult class=postresult>
						<UL></UL>
					</DIV>
				</DIV>
			</DIV>
			<div class="button-area">
				<a style="DISPLAY: none" class="button button-strong detail_addr"
					href="javascript:sendPostAddressInfo();"><span><strong>주소입력</strong></span></a>
				<a class="button" href="javascript:self.close();"><span>닫기</span></a>
			</div>
		</DIV>
	</FORM>
</BODY>
</HTML>
